//
// Created by gogoqiu on 2021/10/19.
//

#ifndef RAPIDSVN_CMAKE_WIFI_MONITOR_H
#define RAPIDSVN_CMAKE_WIFI_MONITOR_H

#include "wx/wx.h"

class WifiMonitorAction
{
public:
    WifiMonitorAction( );
    bool Prepare() ;
    bool Perform() ;

protected:
    //int len;
private:

    static int respLength;
    static char* responseText;

    void read_msg ( int fd );
    int netlink_notify (  );
    void print_flags ( unsigned flags, unsigned change );
    void print_type ( unsigned type );
    void OnTrigger();

    int SetGitIP( const char* url );

    void refresh();
    int count;

    static size_t accumulate(void* buffer,size_t size,size_t num_mem_byte,void *stream/** ignore **/);
};

#endif //RAPIDSVN_CMAKE_WIFI_MONITOR_H
